[engine] changes to DlVertices::Builder and Stopwatch visualizer.#57031
[engine] changes to DlVertices::Builder and Stopwatch visualizer.#57031auto-submit[bot] merged 3 commits intoflutter:mainfrom
Conversation
flar
left a comment
There was a problem hiding this comment.
Mostly looks good, but is there really caching going on?
flow/stopwatch_dl.cc
Outdated
| auto const right = rect.GetRight(); | ||
| auto const bottom = rect.GetBottom(); | ||
|
|
||
| auto const vertices = std::array<DlPoint, 6>{ |
There was a problem hiding this comment.
Why make an array only to immediately turn around and copy the values into the vectors one by one? This could just be 6 lines of "vector_[index_++] = next point".
There was a problem hiding this comment.
Yeah good point, let me swap that out.
| auto mutator = context.state_stack.save(); | ||
| // Cached storage for vertex output. | ||
| std::vector<DlPoint> vertices_storage; | ||
| std::vector<DlColor> color_storage; |
There was a problem hiding this comment.
Weren't these supposed to be cached somewhere? It looks like they are recreated on every frame?
There was a problem hiding this comment.
Or is this just re-use between the 2 graphs?
There was a problem hiding this comment.
Just between the two graphs. originally I was much more ambitious but it turns out that we rebuild the layer each frame so there isn't a good place to put the storage.
flutter/engine@ba7ad87...b8034f1 2024-12-11 skia-flutter-autoroll@skia.org Roll Dart SDK from be9c98daf9df to aa03dca5beb2 (1 revision) (flutter/engine#57136) 2024-12-11 jason-simmons@users.noreply.github.com Make Felt unzip Chrome into a temporary directory next to the final location of the files (flutter/engine#57109) 2024-12-11 jonahwilliams@google.com [engine] changes to DlVertices::Builder and Stopwatch visualizer. (flutter/engine#57031) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jonahwilliams@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…utter/engine#57031) Collection of changes to DlVertices::Builder and the stopwatch visualizer. At a high level: * improve performance of the stopwatch visualizer by pre-allocating storage (and sharing it across both visualizers), lookup up font once, and cache the debug frame rate used. Updates to use Dl types instead of SkTypes. * Change DlVerticesBuilder to allow storing the bounds and use that in the visualizer, since we already know them. Make FML_CHECKS into dchecks, as the dart:ui vertices will already bounds check correctly - so these should only be necessary for debugging engine changes.
Collection of changes to DlVertices::Builder and the stopwatch visualizer.
At a high level:
improve performance of the stopwatch visualizer by pre-allocating storage (and sharing it across both visualizers), lookup up font once, and cache the debug frame rate used. Updates to use Dl types instead of SkTypes.
Change DlVerticesBuilder to allow storing the bounds and use that in the visualizer, since we already know them. Make FML_CHECKS into dchecks, as the dart:ui vertices will already bounds check correctly - so these should only be necessary for debugging engine changes.